﻿# -*- coding: utf-8 -*-

from material import *
from cell import *

class World:

    def __init__(self, size):
        self.cells = dict()
        for x in range(size[0]):
            for y in range(size[1]):
                for z in range(size[2]):
                    self.cells[(x, y, z)] = Cell(Material())

    def setCell(self, pos, cell):
        self.cells[pos] = cell

    def getCell(self, pos):
        return self.cells.get(pos, Cell(Material()))

    def getCells(self):
        return self.cells
